package com.qijian.flowable.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.common.core.domain.BaseEntity;
import com.qijian.common.enums.ApprovalDescriptionEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.util.Date;

/**
 * 流程对象 main_flow
 *
 * @author qijian
 * @date 2024-03-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("main_flow")
public class Flow extends BaseEntity{
    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    private Long id;

    @Excel(name = "编码")
    @ApiModelProperty(value = "编码")
    private String code;

    @Excel(name = "flowable流程使用的类型")
    @ApiModelProperty(value = "flowable流程使用的类型")
    private String flowType;

    @Excel(name = "流程类型(main_flow使用)")
    @ApiModelProperty(value = "流程类型(main_flow使用)")
    public String mainFlowType;

    @Excel(name = "审核者")
    @ApiModelProperty(value = "审核者")
    private String approvalBy;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "审核时间")
    private Date approvalTime;

    @Excel(name = "审核状态")
    @ApiModelProperty(value = "审核状态")
    private ApprovalDescriptionEnum approvalStatus;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "提交时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "提交时间")
    private Date submissionTime;

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @Excel(name = "标题", readConverterExp = "自=定义,工=装_跨部门变革_发起人_随机数")
    @ApiModelProperty(value = "标题（自定义 工装_跨部门变革_发起人_随机数）")
    private String title;

    @Excel(name = "1-新增，2-修改，3-删除")
    @ApiModelProperty(value = "1-新增，2-修改，3-删除")
    private String action;

    @Excel(name = "创建人id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "创建人id")
    private Long createById;

    @Excel(name = "部门id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "部门id")
    private Long deptId;

    @Excel(name = "部门名称")
    @ApiModelProperty(value = "部门名称")
    private String deptName;


    @JsonSerialize(using= ToStringSerializer.class)
    private Long teamId;


    private String teamName;

    @Excel(name = "目标部门id")
    @JsonSerialize(using= ToStringSerializer.class)
    @ApiModelProperty(value = "目标部门id")
    private Long targetDeptId;


    @Excel(name = "目标部门")
    @ApiModelProperty(value = "目标部门")
    private String targetDeptName;


    @Excel(name = "原因")
    @ApiModelProperty(value = "原因")
    private String reason;


    private String notes;


    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "申请时间")
    private Date applyDate;


    @JsonSerialize(using= ToStringSerializer.class)
    private Long applyId;

    private String applyName;

    @JsonSerialize(using= ToStringSerializer.class)
    private Long applyDeptId;

    private String applyDeptName;

    private String qksm;

}
